export type TUserInfo = {
  id: number;
  name: string;
  phone: string;
  email: string;
  avatar: string;
  openid: string;
  accessToken: string;
  refreshToken: string;
};
export type TLoginReq = TLoginByEmailReq | TLoginByPwdReq;
export type TLoginByPwdReq = {
  name: string;
  password: string;
  openid: string;
};

export type TLoginByEmailReq = {
  email: string;
  code: string;
  openid: string;
};

export type TRegisterReq = {
  name: string;
  password: string;
  phone: string;
  email: string;
  avatar: string;
};
export type TUpdateUserReq = {
  id: number;
  name: string;
  phone: string;
  email: string;
  avatar: string;
};

export type TRefreshTokenReq = {
  refreshToken: string;
};

export type TRefreshToken = {
  accessToken: string;
  refreshToken: string;
};
